<!-------------------------------------------
#############  德数WMS  #################
###   email:yueran@pku.edu.org        ###
###   QQ群号：201541335                ###
#----------------------------------------->
{% import 'admin/layout.html' as layout with context -%}
{% import 'admin/static.html' as admin_static with context %}
<!DOCTYPE html>
<html>
<head>
  <title>{% block title %}{% if admin_view.category %}{{ admin_view.category }} - {% endif %}{{ admin_view.name }} - {{ admin_view.admin.name }}{% endblock title%}</title>

  {% block head_meta %}
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="description" content="Flask-Admin dashboard login template">
  <meta name="author" content="Jonathan Ars">
  {% endblock head_meta %}

  {% block head_css %}
  <!-- Bootstrap 3.3.6 -->
  <link href="{{url_for('static',filename='css/bootstrap.min.css')}}" rel="stylesheet"></link>
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
  <!-- Theme style -->
  <link href="{{url_for('static',filename='css/AdminLTE.css')}}" rel="stylesheet"></link>
  <!-- AdminLTE Skins. Choose a skin from the css/skins folder instead of downloading all of them to reduce the load. -->
  <link href="{{url_for('static',filename='css/skins/_all-skins.min.css')}}" rel="stylesheet"></link>
  <!-- iCheck 
  <link href="{{url_for('static',filename='plugins/iCheck/flat/blue.css')}}" rel="stylesheet"></link>
  -->
  <!-- Morris chart 
  <link href="{{url_for('static',filename='plugins/morris/morris.css')}}" rel="stylesheet"></link>
  -->
  <!-- jvectormap 
  <link href="{{url_for('static',filename='plugins/jvectormap/jquery-jvectormap-1.2.2.css')}}" rel="stylesheet"></link>
  -->
  <!-- Date Picker 
  <link href="{{url_for('static',filename='plugins/datepicker/datepicker3.css')}}" rel="stylesheet"></link>
  -->
  <!-- Daterange picker
  <link href="{{url_for('static',filename='plugins/daterangepicker/daterangepicker.css')}}" rel="stylesheet"></link>
   -->
  <!-- bootstrap wysihtml5 - text editor 
  <link href="{{url_for('static',filename='plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css')}}" rel="stylesheet"></link>
 -->
  <!-- Flask-admin admin styles -->
  <link href="{{ admin_static.url(filename='admin/css/bootstrap3/admin.css', v='1.1.1') }}" rel="stylesheet">
  {% if admin_view.extra_css %}
  {% for css_url in admin_view.extra_css %}
  <link href="{{ css_url }}" rel="stylesheet">
  {% endfor %}
  {% endif %}

  {% endblock head_css%}

  {% block head %}
  {% endblock head%}

  {% block head_tail %}
  {% endblock head_tail%}

</head>
<body class="hold-transition skin-blue sidebar-mini">

  {% block page_body %}

  <!-- TOP NAVBAR -->
  <div class="wrapper">
    {% if current_user.is_authenticated %}
    <header class="main-header">
      <!-- Logo -->
      {% block brand %}
      <a href="{{ admin_view.admin.url }}" class="logo">
        <!-- mini logo for sidebar mini 50x50 pixels -->
        <span class="logo-mini"><b>德数</b></span>
        <!-- logo for regular state and mobile devices -->
        <span class="logo-lg"><b>{{ admin_view.admin.name }}</b></span>
      </a>
      {% endblock brand%}

      <!-- Header Navbar: style can be found in header.less -->
      <nav class="navbar navbar-static-top">
        <!-- Sidebar toggle button-->
        <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
          <span class="sr-only">导航按钮</span>
        </a>

        <div class="navbar-custom-menu">
          <ul class="nav navbar-nav">
            <!-- Notifications: style can be found in dropdown.less -->
            <li class="dropdown notifications-menu">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                <i class="fa fa-bell-o"></i>
                <span class="label label-warning">10</span>
              </a>
              <ul class="dropdown-menu">
                <li class="header">You have 10 notifications</li>
                <li>
                  <!-- inner menu: contains the actual data -->
                  <ul class="menu">
                    <li>
                      <a href="#">
                        <i class="fa fa-users text-aqua"></i> 5 new members joined today
                      </a>
                    </li>
                    <li>
                      <a href="#">
                        <i class="fa fa-warning text-yellow"></i> Very long description here that may not fit into the
                        page and may cause design problems
                      </a>
                    </li>
                    <li>
                      <a href="#">
                        <i class="fa fa-users text-red"></i> 5 new members joined
                      </a>
                    </li>
                    <li>
                      <a href="#">
                        <i class="fa fa-shopping-cart text-green"></i> 25 sales made
                      </a>
                    </li>
                    <li>
                      <a href="#">
                        <i class="fa fa-user text-red"></i> You changed your username
                      </a>
                    </li>
                  </ul>
                </li>
                <li class="footer"><a href="#">View all</a></li>
              </ul>
            </li>

            <!-- Control Sidebar Toggle Button 
            <li>
              <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
            </li>-->
            <li>
              {% block access_control %}
              {% endblock %}
            </li>
          </ul>

          {% block menu_links %}
          <ul class="nav navbar-nav navbar-right">
            {{ layout.menu_links() }}
          </ul>
          {% endblock %}

        </div>
      </nav>
    </header>
    <!-- / TOP NAVBAR -->

    <!-- LEFT MENU -->
    <aside class="main-sidebar">
      <!-- sidebar: style can be found in sidebar.less -->
      <section class="sidebar">
        <!-- Sidebar user panel -->
        <div class="user-panel">
          <div class="pull-left image">
            <i class="fa fa-user-circle" style="color: white; font-size: 2.5em;"></i>
          </div>
          <div class="pull-left info">
            <p>
             {% if current_user.first_name -%}
             {{ current_user.first_name }}
             {% else -%}
             {{ current_user.email }}
             {%- endif %}
           </p>
           <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
         </div>
       </div>
       <!-- search form -->
       <form action="#" method="get" class="sidebar-form">
        <div class="input-group">
          <input type="text" name="q" class="form-control" placeholder="Search...">
          <span class="input-group-btn">
            <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
            </button>
          </span>
        </div>
      </form>
      <!-- /.search form -->
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu">
        <li class="header">MAIN NAVIGATION</li>
        {% block main_menu %}
        {{ layout.menu() }}
        {% endblock %}
        <li>
          <a href="#">
            <i class="fa fa-envelope"></i> <span>Mailbox</span>
            <span class="pull-right-container">
              <small class="label pull-right bg-yellow">12</small>
              <small class="label pull-right bg-green">16</small>
              <small class="label pull-right bg-red">5</small>
            </span>
          </a>
        </li>
        <li class="treeview">
          <a href="#">
            <i class="fa fa-share"></i> <span>Multilevel</span>
            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
          </a>
          <ul class="treeview-menu">
            <li><a href="#"><i class="fa fa-circle-o"></i> Level One</a></li>
            <li>
              <a href="#"><i class="fa fa-circle-o"></i> Level One
                <span class="pull-right-container">
                  <i class="fa fa-angle-left pull-right"></i>
                </span>
              </a>
              <ul class="treeview-menu">
                <li><a href="#"><i class="fa fa-circle-o"></i> Level Two</a></li>
                <li>
                  <a href="#"><i class="fa fa-circle-o"></i> Level Two
                    <span class="pull-right-container">
                      <i class="fa fa-angle-left pull-right"></i>
                    </span>
                  </a>
                  <ul class="treeview-menu">
                    <li><a href="#"><i class="fa fa-circle-o"></i> Level Three</a></li>
                    <li><a href="#"><i class="fa fa-circle-o"></i> Level Three</a></li>
                  </ul>
                </li>
              </ul>
            </li>
            <li><a href="#"><i class="fa fa-circle-o"></i> Level One</a></li>
          </ul>
        </li>
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>

  <!-- Content Wrapper. Contains page content color white-->
  <div class="content-wrapper">
    {% endif %}

    {% block messages %}
    {{ layout.messages() }}
    {% endblock messages %}

    {# store the jinja2 context for form_rules rendering logic #}
    {% set render_ctx = h.resolve_ctx() %}


    {% block body %}

    {% endblock body %}

    {% if current_user.is_authenticated %}
  </div>
  <!-- / Content Wrapper. color white -->

  <!-- Control Sidebar -->
  <aside class="control-sidebar control-sidebar-dark">
    <!-- Create the tabs -->
    <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
      <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-cog"></i></a></li>
    </ul>
    <!-- Tab panes -->
    <div class="tab-content">
      <!-- Stats tab content -->
      <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
      <!-- /.tab-pane -->
      <!-- Settings tab content -->
      <div class="tab-pane" id="control-sidebar-settings-tab">
        <form method="post">
          <h3 class="control-sidebar-heading">General Settings</h3>

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Report panel usage
              <input type="checkbox" class="pull-right" checked>
            </label>

            <p>
              Some information about this general settings option
            </p>
          </div>
          <!-- /.form-group -->

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Allow mail redirect
              <input type="checkbox" class="pull-right" checked>
            </label>

            <p>
              Other sets of options are available
            </p>
          </div>
          <!-- /.form-group -->

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Expose author name in posts
              <input type="checkbox" class="pull-right" checked>
            </label>

            <p>
              Allow the user to show his name in blog posts
            </p>
          </div>
          <!-- /.form-group -->

          <h3 class="control-sidebar-heading">Chat Settings</h3>

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Show me as online
              <input type="checkbox" class="pull-right" checked>
            </label>
          </div>
          <!-- /.form-group -->

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Turn off notifications
              <input type="checkbox" class="pull-right">
            </label>
          </div>
          <!-- /.form-group -->

          <div class="form-group">
            <label class="control-sidebar-subheading">
              Delete chat history
              <a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
            </label>
          </div>
          <!-- /.form-group -->
        </form>
        <h3 class="control-sidebar-heading">Recent Activity</h3>
        <ul class="control-sidebar-menu">
          <li>
            <a href="javascript:void(0)">
              <i class="menu-icon fa fa-birthday-cake bg-red"></i>

              <div class="menu-info">
                <h4 class="control-sidebar-subheading">Langdon's Birthday</h4>

                <p>Will be 23 on April 24th</p>
              </div>
            </a>
          </li>
          <li>
            <a href="javascript:void(0)">
              <i class="menu-icon fa fa-envelope-o bg-light-blue"></i>

              <div class="menu-info">
                <h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>

                <p>nora@example.com</p>
              </div>
            </a>
          </li>
        </ul>
        <!-- /.control-sidebar-menu -->

        <h3 class="control-sidebar-heading">Tasks Progress</h3>
        <ul class="control-sidebar-menu">
          <li>
            <a href="javascript:void(0)">
              <h4 class="control-sidebar-subheading">
                Custom Template Design
                <span class="label label-danger pull-right">70%</span>
              </h4>

              <div class="progress progress-xxs">
                <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
              </div>
            </a>
          </li>
          <li>
            <a href="javascript:void(0)">
              <h4 class="control-sidebar-subheading">
                Update Resume
                <span class="label label-success pull-right">95%</span>
              </h4>

              <div class="progress progress-xxs">
                <div class="progress-bar progress-bar-success" style="width: 95%"></div>
              </div>
            </a>
          </li>
        </ul>
      </div>
      <!-- /.tab-pane -->
    </div>
  </aside>
  <!-- /.control-sidebar -->
  <!-- Add the sidebar's background. This div must be placed
  immediately after the control sidebar -->
  <div class="control-sidebar-bg"></div>

  <footer class="main-footer">
     <strong>Copyright &copy; 2023 <a href="https://deshu.com">德数物联</a></strong> 
    
    <div class="pull-right hidden-xs">
      <b>Version</b> 1.0
    </div>
  </footer>
  {% endif %}

</div>
<!-- ./wrapper -->

{% endblock page_body%}

{% block tail_js %}
<!-- jQuery 2.2.3 -->
<script src="{{url_for('static',filename='plugins/jQuery/jquery-2.2.3.min.js')}}"></script>
<!-- jQuery UI 1.11.4 -->
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
  $.widget.bridge('uibutton', $.ui.button);
</script>
<!-- Bootstrap 3.3.6 -->
<script src="{{url_for('static',filename='js/bootstrap.min.js')}}"></script>
<script src="{{ admin_static.url(filename='vendor/select2/select2.min.js', v='3.5.2') }}" type="text/javascript"></script>

{% if admin_view.extra_js %}
{% for js_url in admin_view.extra_js %}
<script src="{{ js_url }}" type="text/javascript"></script>
{% endfor %}
{% endif %}

<!-- Morris.js charts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
<script src="{{url_for('static',filename='plugins/morris/morris.min.js')}}"></script>
<!-- Sparkline -->
<script src="{{url_for('static',filename='plugins/sparkline/jquery.sparkline.min.js')}}"></script>
<!-- jvectormap -->
<script src="{{url_for('static',filename='plugins/jvectormap/jquery-jvectormap-1.2.2.min.js')}}"></script>    
<script src="{{url_for('static',filename='plugins/jvectormap/jquery-jvectormap-world-mill-en.js')}}"></script>    
<!-- jQuery Knob Chart -->
<script src="{{url_for('static',filename='plugins/knob/jquery.knob.js')}}"></script>    
<!-- daterangepicker -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script>
<script src="{{url_for('static',filename='plugins/daterangepicker/daterangepicker.js')}}"></script>    
<!-- datepicker -->
<script src="{{url_for('static',filename='plugins/datepicker/bootstrap-datepicker.js')}}"></script>    
<!-- Bootstrap WYSIHTML5 -->
<script src="{{url_for('static',filename='plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js')}}"></script>    
<!-- Slimscroll -->
<script src="{{url_for('static',filename='plugins/slimScroll/jquery.slimscroll.min.js')}}"></script>    
<!-- FastClick -->
<script src="{{url_for('static',filename='plugins/fastclick/fastclick.js')}}"></script>
<!-- AdminLTE App -->
<script src="{{url_for('static',filename='js/app.min.js')}}"></script>
<!-- AdminLTE for demo purposes -->
<script src="{{url_for('static',filename='js/demo.js')}}"></script>
{% if admin_view.name=="Home" %}
  <script src="{{url_for('static',filename='js/pages/dashboard.js')}}"></script>
{% endif %}

{% endblock tail_js%}

{% block tail %}
{% endblock tail %}

</body>
</html>
